////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//   File Name: BusinessThread.h 
//	Class Name: CBusinessThread
// Description:
//     Creator: shao chuyu
//     Version: 2013.5.23 - 1.0 - Create
//		Notice:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once
struct CPack;
interface CRuleDao;
interface CGroupDao; 
interface CMachineDao;
class CSession;
class CBusinessThread
{
public:
	CBusinessThread(void);
	~CBusinessThread(void);

	int  Run();

	bool Start(void);

	UINT  static WINAPI  BusinessThreadFn(void* pPrarm);
	bool  SendData(CSession* pSession ,char* buff,int nlen);

	void DoPacket(CPack* packet);
	void DoLogin(CPack* packet);
	void DoRule(CPack* packet);
	void DoHeartBeat(CPack* packet);
	void DoUpdateRule(CPack* packet);
	
public:
	HANDLE m_hBusinessThread;

	CRuleDao* m_ruleDao;
	CGroupDao* m_groupDao;
	CMachineDao*   m_machineDao;


};
